//这里
require(['./config'],()=>{
    //先引入config ，让配置生效就可以使用配置好的短名称
    require(['template','header','footer','bootstrap','jquery'],(template)=>{
      class List{
        constructor(){
         
          
          
          this.Tiaozhuan()
          this.getList()
        }
        
       
       Tiaozhuan(){
          $('#fei').on('click',function(){
            window.location.href="/html/details.html";
          })
       }
       getList(){
         //获取数据
         //https://xiongmaoyouxuan.com/api/tab/
         const id  = location.search.slice(4)
        $.get(`https://xiongmaoyouxuan.com/api/tab/${location.search.slice(4)}`,resp=>{
          if(resp.code ===200){
            let {list} = resp.data.items
            const {cname}  =resp.data.category
            // list = list.slice(0,8)
            $('#nabudao').html(
              template('nabudaoTemplate', { 
              cname,
              list 
            })
            )
            
          }
        })
        // location.search.slice(4)

       } 
        
      }
      new List()
    })
  })
  